package com.fjec.im.config;

import com.fjec.common.aliyun.sms.AliSmsConfig;
import com.fjec.common.aliyun.sms.AliyunSmsHelper;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfig {

    @Bean
    @ConfigurationProperties(prefix = "user.sms.config")
    public AliSmsConfig aliSmsConfig() {
        return new AliSmsConfig();
    }

    @Bean
    public AliyunSmsHelper aliyunSmsHelper(AliSmsConfig aliSmsConfig) {
        return new AliyunSmsHelper(aliSmsConfig);
    }
}
